package com.jiaok.controller;

import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @Author jiaok
 * @Date 2023/5/4 10:49
 */
@RestController
@RequestMapping("/teacher")
public class TeacherController {
//    @PreAuthorize("hasAuthority('teacher:query111')")
    @PreAuthorize("@ex.hasAuthority('teacher:query111')")
    @GetMapping("/query")
    public String queryInfo(){
        return "I`m a teacher And my name is jiaoKTeacher";
    }
}
